package com.lebang.feign;

import com.lebang.feign.fallback.HundredAwardsFallback;
import com.lebang.model.RequestUserInfo;
import com.lebang.model.back.Result;
import com.lebangweb.response.JsonData;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ljx
 */
@FeignClient(name = "wangzhuan-earns", contextId = "wangzhuan-earns-hundredAwards", fallback = HundredAwardsFallback.class)
public interface HundredAwardsFeign {
    /**
     * 百倍奖励入口金币配置
     * @return
     */
    @PostMapping("/hundred/awards/point/config")
    JsonData pointConfig(@RequestBody RequestUserInfo request);

    /**
     * 判断该次数是否进入特殊奖励
     *
     * @param request
     * @param goldId
     * @return
     */
    @PostMapping("/hundred/awards/get/status")
    JsonData getStatus(@RequestBody RequestUserInfo request, @RequestParam("goldId") Integer goldId);

    /**
     * 博百倍奖励转盘
     *
     * @param request
     * @return
     */
    @ApiOperation("博百倍奖励转盘")
    @PostMapping("/hundred/awards/reward")
    JsonData hundredReward(@RequestBody RequestUserInfo request, @RequestParam("pointRecordId")Long pointRecordId,@RequestParam("status") Boolean status);


    /**
     * 顺延必出每日必赚的次数
     */
    @PostMapping("/hundred/awards/nextCount")
    JsonData nextCount(@RequestBody RequestUserInfo request);


    /**
     * 领取奖励
     * @param request
     * @return
     */
    @PostMapping("/hundred/awards/pull")
    Result<Integer> pull(@RequestBody RequestUserInfo request,@RequestParam("goldId") Integer goldId,@RequestParam("pointRecordId") Long pointRecordId, @RequestParam("status") Integer status);

    /**
     * 百倍奖励进度配置
     */
    @PostMapping("/hundred/awards/double/config")
    JsonData doubleConfig(@RequestBody RequestUserInfo request,@RequestParam("type") Integer type);

    /**
     * 百倍奖励顺延
     * @return
     */
    @PostMapping("/hundred/awards/put/off")
    JsonData putOff(@RequestBody RequestUserInfo request,@RequestParam("pointRecordId") Long pointRecordId);

    /**
     * 放弃百倍奖励
     *
     * @param request
     * @return
     */
    @PostMapping("/hundred/awards/giveup")
    JsonData giveUp(@RequestBody RequestUserInfo request, @RequestParam("pointRecordId")Long pointRecordId);

    /**
     * 领取百倍奖励
     */
    @PostMapping("/hundred/awards/get/awardspoint")
    Result<Integer> getAwardsPoint(@RequestBody RequestUserInfo request, @RequestParam("type") Integer type,@RequestParam("pointRecordId")Long pointRecordId, @RequestParam("seconds") long seconds);


    /**
     * 是否首次百倍
     */
    @PostMapping("/hundred/awards/hasFirst")
    JsonData hasFirst(@RequestBody RequestUserInfo  request,@RequestParam("num") int num, @RequestParam("pointRecordId") Long pointRecordId);

    /**
     * 百倍任务进度配置
     * @return
     */
    @PostMapping("/hundred/awards/get/douleconfig")
    JsonData doubleConfig(@RequestBody RequestUserInfo  request);
}
